using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Monster : MonoBehaviour
{
    // Start is called before the first frame update
    public string aimstatus;
    string status;
    Animator animator;
    void Start()
    {
        status = "stand";
        animator = GetComponent<Animator>();
    }

    // Update is called once per frame
    void Update()
    {
        if(aimstatus!="")
            changestatus(aimstatus);
    }

    void changestatus(string aim)
    {
        if (status == aim) return;

        status = aim;

        if (status == "attack")
        {
            Debug.Log("changestatus 2");
            animator.SetTrigger("Attack");
        }
    }
}
